import java.util.Scanner;
/**
 * Project: SecuritySnort
 * This class takes care of the basic command line
 * user interface that the user will interact with.
 * This class should be directly called from the main()
 *
 * @author Jonathan Buttner
 * @version Jan 21, 2010
 */

public class InputReader
{
	/**************************************************************************
	 * 							Globals
	 *************************************************************************/
	private CommandId _cmdIder;
	
	/**************************************************************************
	 * 							Constructors
	 *************************************************************************/
	/**
	 * This constructor sets up the basic objects needed to run the input.
	 */
	public InputReader()
	{
		_cmdIder = new CommandId();
	}
	
	/**************************************************************************
	 * 							Public Methods
	 *************************************************************************/
	/**
	 * When this method is called the program is started.
	 * This method will return false when the 'exit' command is
	 * entered.
	 * 
	 * @return a boolean of whether to continue getting input.
	 */
	public boolean run()
	{
		System.out.println( "\nPlease enter a command, type"
				+ " 'help' for more information." );
		Scanner scan = new Scanner( System.in );
		boolean getMoreCmds = _cmdIder.deterCmd( scan.nextLine() );
		
		//scan.close();
		
		return getMoreCmds;
	}
	
	/**
	 * This method prints the welcome text onto the console.
	 */
	public void printWelcome()
	{
		System.out.println( "Welcome to SecuritySnort the"
				+ " ultimate network utility." );
	}
}
